$(function () {

    'use strict';

    // Select2
    $('.select2').select2({minimumResultsForSearch: Infinity});

    // Select2 by showing the search
    $('.select2-show-search').select2({
        minimumResultsForSearch: ''
    });

    $("#bt_search_name").click(function () {
        var name = $('input[name="name"]').val();
        if(name.trim().length > 0){
            $(location).attr('href', '/crm/company/list?name=' + name);
            return;
        }
    });

});